From: Jan Beulich Date: Wed, 18 Dec 2019 13:49:59 +0000 (+0100) Subject: x86: provide Dom0 access to PPIN via XENPF_resource_op X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~1017 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=5c13ed79f3cba200f21e7dfd6ed7f3aa08e4dada;p=xen.git x86: provide Dom0 access to PPIN via XENPF_resource_op It was requested that we provide a way independent of the MCE reporting interface that Dom0 software could use to get hold of the values for particular CPUs. Signed-off-by: Jan Beulich Acked-by: Andrew Cooper --- diff --git a/xen/arch/x86/platform_hypercall.c b/xen/arch/x86/platform_hypercall.c index b19f6ec4ed..80efb84328 100644 --- a/xen/arch/x86/platform_hypercall.c +++ b/xen/arch/x86/platform_hypercall.c @@ -30,6 +30,7 @@ #include #include #include +#include "cpu/mcheck/mce.h" #include "cpu/mtrr/mtrr.h" #include @@ -94,6 +95,9 @@ void check_resource_access(struct resource_access *ra) switch ( entry->u.cmd ) { case XEN_RESOURCE_OP_MSR_READ: + if ( ppin_msr && entry->idx == ppin_msr ) + break; + /* fall through */ case XEN_RESOURCE_OP_MSR_WRITE: if ( entry->idx >> 32 ) ret = -EINVAL;